{if empty($_W['isajax'])}
{template 'common/top'}
{/if}
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
      <div class="base_topBar ">
          <div class="base_explain">
              <span id="toolbar_title">编辑图标信息</span>
              <div class="warn_info_box clearfix">
              </div>
          </div>
          <div class="base_topBar_right">
              <div class="operate_items clearfix">
                  <div class="user_feedBack operate_item">
                      <a href="#" class="userFeedbackClick">
                          用户反馈
                      </a>
                  </div>
              </div>
          </div>
      </div>
    <!-- Main content -->
    <section class="content">
      <div class="row">
        <!-- right column -->
        <div class="col-xs-4 col-sm-8 col-md-12">
          <!-- Horizontal Form -->
          <div class="box box-info">
            <!-- /.box-header -->
            <!-- form start -->
           <form action="" method="post"  class="form-horizontal" enctype="multipart/form-data">
              <div class="box-body">
                <div class="form-group">
                  <label class="col-xs-12 col-sm-2 col-md-2 control-label">标题</label>
                  <div class="col-xs-12 col-sm-10 col-md-10">
                    <input type="text" placeholder="" name="name" value="{$item['name']}" class="form-control"/>
					<span class="help-block"></span>
                  </div>
                </div>
              <div class="form-group">
                  <label class="col-xs-12 col-sm-2 col-md-2 control-label">链接</label>
                  <div class="col-xs-12 col-sm-10 col-md-10">
                      <div class="input-group">
                          <input type="text" value="{php echo $item['link']}" id="link" name="link" class="form-control" autocomplete="off">
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">选择链接 <span class="caret"></span></button>
                            <ul class="dropdown-menu">
                                <li>
                                    <a data-ido="index" data-url="weidun_questions/pages/index/index" class="urlitem">主页（荐）</a>
                                </li>
                                <li>
                                    <a data-ido="my" data-url="weidun_questions/pages/my/my" class="urlitem">个人中心（荐）</a>
                                </li>
                            </ul>
                        </span>
                      </div>
                  </div>
              </div>
                <div class="form-group">
                  <label class="col-xs-12 col-sm-2 col-md-2 control-label">图片</label>
                  <div class="col-xs-12 col-sm-10 col-md-10">
                    {php echo tpl_form_field_image('image',$item['image'])}
                    <span class="help-block"></span>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-xs-12 col-sm-2 col-md-2 control-label">排序</label>
                  <div class="col-xs-12 col-sm-10 col-md-10">
                    <input type="text" placeholder="" name="sort" value="{$item['sort']}" class="form-control"/>
					<span class="help-block"></span>
                  </div>
                </div>
              </div>
			  <div class="box-footer">
                <input type="hidden" name="token" value="{$_W['token']}" />
                <button type="submit" class="waves-effect waves-light btnMid btnBlue completeBtn">写好了</button>
              </div>
            </form>
          </div>
          <!-- /.box -->
        </div>
        <!--/.col (right) -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->
</div>
{if empty($_W['isajax'])}
{template 'common/foot'}
<script type="text/javascript">	
	$(".urlitem").click(function(){
        $("#link").val($(this).data('url'));
	}); 
</script>
{/if}